const {createProxyMiddleware} = require('http-proxy-middleware');

module.exports = function (app) {
    app.use(createProxyMiddleware('/low-carbon-screen', {
        target: process.env.REACT_APP_URL_PROXY,
        changeOrigin: true,
        pathRewrite: (path) => path.replace(/^\/low-carbon-screen/, '/low-carbon-screen'),
        // pathRewrite: {
        //     '^\/low-carbon-screen': '/low-carbon-screen'
        // }
    }))
}
